import { createRouter, createWebHistory } from 'vue-router';
import LocationsPage from '../components/LocationsPage.vue';
import LocationEditPage from '../components/LocationEditPage.vue';

const routes = [
  {
    path: '/locations',
    name: 'LocationsPage',
    component: LocationsPage
  },
  {
    path: '/locations/:name/edit',
    name: 'LocationEditPage',
    component: LocationEditPage
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;